import java.sql.*;

public class App3 {
    public static void main(String[] args) throws ClassNotFoundException, SQLException {
        Class.forName("com.mysql.jdbc.Driver");
        String url = "jdbc:mysql://localhost:3306/test?useSSL=false";
        String name="root";
        String password = "yangxiaocheng3";
        Connection connection = DriverManager.getConnection(url, name, password);
        Statement statement = connection.createStatement();
        String sql = "INSERT `user`(`username`,`passward`) VALUES('coco',MD5('789'))";
        int i = statement.executeUpdate(sql);
        if(i>0){
            System.out.println("插入成功！");
        }
    }
}
